home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_01
/
1001023b
< prev
next >
Wrap
Text File
|
1991-11-15
|
454b
|
42 lines
Example of C Functions With C++ Key Word Names
This code doesn't work:
new.cpp:
extern int new();
main()
{
int x = new();
}
So replace it with this code:
example2.h:
#ifndef __cplusplus
extern int new();
#endif
#ifdef __cplusplus
extern int new_one();
#endif
example2.c:
#include "example2.h"
int new_one()
{
return(new());
}
new2.cpp:
#include "example2.h"
main()
{
int x = new_one();
}